package org.zero.onlinesubject.service;

import org.zero.onlinesubject.common.vo.CourseVo;
import org.zero.onlinesubject.common.vo.PageResult;
import org.zero.onlinesubject.entity.ChapterVideo;
import org.zero.onlinesubject.entity.Course;
import com.baomidou.mybatisplus.extension.service.IService;
import org.zero.onlinesubject.entity.CourseType;
import org.zero.onlinesubject.entity.TagType;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

/**
 *
 */
public interface CourseService extends IService<Course> {

    List<CourseType> getCourseTypeList();

    Boolean addCourse(Course course);

    PageResult<Course> getCourseList(String userId, Integer start, Integer end) throws ExecutionException, InterruptedException;

    int getUserCourseCount(String userId);

    int getCourseListCount();

    Boolean updateCourse(Course course);

    Boolean delCourse(String courseId) throws ExecutionException, InterruptedException, TimeoutException;

    Boolean joinCourse(String userid,String courseId);

    List<CourseVo> getHot();

    Boolean addChapterVideo(ChapterVideo chapterVideo,String courseId);

    PageResult<CourseVo> getCourseByCond(String tagCode,String typeCode,Integer current,Integer size) throws ExecutionException, InterruptedException, TimeoutException;

    PageResult<CourseVo> getCourseBySearch(String courseName,Integer current,Integer size) throws ExecutionException, InterruptedException, TimeoutException;

    List<CourseVo> getOwnCourse(String userid);

    List<TagType> getTagList();

    CourseVo getCourseVo(String courseId);

    List<CourseVo> getMyLearn();

    List<Course> getTop5();

    List<Course> getOwnCourseNameList(String userid);
}
